package day19.pack9;

import sun.misc.Unsafe;

import java.lang.reflect.Field;

public class Test2 {
    private static final Unsafe unsafe /*= Unsafe.getUnsafe()*/;
    static {
        try {
            Field field = Unsafe.class.getDeclaredField("theUnsafe");
            field.setAccessible(true);
            unsafe = (Unsafe) field.get(null);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }

    }
    public static void main(String[] args) {
//        unsafe.objectFieldOffset()
//        unsafe.compareAndSwapInt()
        System.out.println(unsafe);
    }
}
